<div class="panel panel-default">
	<div class="panel-heading">
		<h2 class="panel-title">Login</h2>
	</div>
	<div class="panel-body">
		<div ng-if="!loggedIn && isSecure" class="form-container">

			<form name="loginForm" role="form" ng-submit="login(username, password)">
				<legend class="form-label">Enter Credentials</legend>
				<div class="form-group">
					<label>User</label> <input id="username" name="username"
						class="form-control" type="text" ng-model="username"
						placeholder="someone" autofocus/>
				</div>
				<div class="form-group">
					<label>Password</label> <input id="password" name="password"
						class="form-control" type="password" ng-model="password" />
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-success" value="Submit">Submit</button>
				</div>
			</form>
			<div ng-if="failed">
				<p><font color="red">Login failed! Username or password incorrect.</font></p>
			</div>

		</div>
		<div ng-if="loggedIn && isSecure">
			<button type="button" class="btn btn-danger" ng-click="logout()">Are you sure you want to Logout?</button>
		</div>
		<div ng-if="!isSecure">
			<p>This ha-bridge instance is not secured!</p>
		</div>
	</div>
</div>